#ifndef __platform_heart_h__
#define __platform_heart_h__ 1

typedef struct{
    uint32_t size;
    uint32_t seq;
    uint32_t time;
    uint32_t probeId;
    uint32_t checkCode;
    uint32_t cycle;
    uint32_t cmd_id;
}heart_pkt_t;

typedef struct{
    int fd;
    uint16_t port;
    char host[32];
    uint32_t seq;
    uint32_t probeId;
    uint32_t cycle;
}HeartInfo_t;

#define HEART_LISTNE_PORT 55489

void init_heartinfo(HeartInfo_t* hi, char* probeId, int cycle, char *host, uint16_t port);
void* heart_bit_loop(void* arg);
#endif